﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>下级客户列表-微街秀管理后台</title>
    <link href="../css/css.css" rel="stylesheet" type="text/css" />
    <link href="../../client/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<style>
body{ background-color:White; font-size:14px;}
table{border-collapse: collapse;border: none;width:100%; text-align:center;}
td{border: solid #ccc 1px;color:Black; height:26px;}
td a{ text-decoration:none;}
.td1,.td2,.td3,.td6{width:100px; height:30px; font-weight:bold; text-align:center;}
.td4,.td5{width:250px; font-weight:bold; text-align:center;}
.th_sort_click{ background-color:#ccc;}
</style>
    <script src="../js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="../js/base.js" type="text/javascript"></script>
    <script src="../js/ajax-data.js" type="text/javascript"></script>
    <script src="../js/Pager.js" type="text/javascript"></script>
    <script src="../js/dialog.js" type="text/javascript"></script>
</head>
<body>
<div style="width:880px; margin-left:auto; margin-right:auto;">
<div style="height:50px;">代理商：<span id="sitename"></span><br />
微街秀ID：<input type="text" id="id" name="id" style="width:80px;"/>
账号:<input type="text" id="name" name="name" style="width:80px;"/>
手机：<input type="text" id="phone" name="phone" style="width:80px;"/>
邮箱：<input type="text" id="email" name="email" style="width:80px;"/>
<input type="button" id="submits" value="搜索" onclick="submits()" />
</div>
  <table class="table-striped table-hover table-bordered">
  <tr>
      <th class='td1'>ID</th>
      <th class='td5'>昵称</th>
      <th class='td3'>版本</th>
      <th class='td4'>开始日期</th>
      <th class='td5'>到期</th>
      <th class='td3'>电话</th>
      <th class='td3'>邮箱</th>
  </tr>
  <tbody id="list">
  
  </tbody>
    </table>
 <div class="pager_style">
    <ul class="page_num"></ul>
    <ul class="page_info">
        <li>总数:<span id="count">0</span></li>
        <li>每页:<span id="pageSize">0</span></li>
        <li>页数:<span id="pageToal">0</span></li>
    </ul>
</div>
<input type="hidden" id="pagecount" value="0" />
</div>
 <script>
     $(function () {
         var sitename = getQueryString("sitename");
         $("#sitename").html(decodeURIComponent(sitename));
         GetList(1);
     })

     function GetList(page) {
         var param = "page_index=" + page;
         var agentid = getQueryString("agentid");
         var version_id = 0;
         if (getQueryString("version_id") != null)
             version_id = getQueryString("version_id"); //版本
         if (agentid != "")
             param += "&agentid=" + agentid;
         else
             return;

         param += "&id=" + $("#id").val();
         param += "&name=" + $("#name").val();
         param += "&phone=" + $("#phone").val();
         param += "&email=" + $("#email").val();
         param += "&version_id=" + version_id;
         $("#list").html("");
         var html = "";

         AjaxStart("../ajax/user.ashx?getlist_agent", param, function (data) {
             if (data.code != 0) {
                 $("#list").html(html + "<tr><td colspan='8'>" + data.msg + "</td></tr>");
             }
             else {
                 $("#list").html("");
                 var list = data.item.table;
                 for (var i = 0; i < list.length; i++) {
                     html += "<tr>";
                     html += "<td>" + list[i].id + "</td>";
                     html += "<td style='text-align:left;'>" + list[i].nick_name + "</td>";
                     if (list[i].version_id > 0)
                         html += "<td>" + list[i].groupname + "</td>";
                     else
                         html += "<td>&nbsp;</td>";
                     html += "<td>" + GetDate(list[i].date) + "</td>";
                     html += "<td>" + GetDate(list[i].end_date) + "</td>";
                     html += "<td>" + (list[i].phone == null ? "" : list[i].phone) + "</td>";
                     html += "<td>" + (list[i].email == null ? "" : list[i].email) + "</td>";
                     html += "</tr>";
                 }
                 $("#list").html(html);
                 var pager = new Pager();
                 $(".page_info").css("display","block")
                 pager.initPage(page, data.item.itemCount, 20, 5, GetList);
             }
         });
     }

     function submits() {
         GetList(1);
     }
 </script>
</body>
</html>
